package com.aoneposapp.firstdata;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;


public class Parameters {
	
	public static String DID = "00010852642682347179";
	public static String App = "RAPIDCONNECTVXN";
	public static String Auth = "200018407|00000001";
	public static String ClentRef = "0023185AOne Pos_v4.0.3";
	public static String ServiceId = "160";
	public static String STAN = "100002";
	public static String TPPID = "RAO001";
	public static String TID = "00000001";
	public static String MerchantId = "8407";
	public static String GroupId = "20001";

	public static String RequestTypeCREDIT = "CreditRequest";
	public static String RequestTypeDEBIT = "DebitRequest";
	public static String RequestTypePLDEBIT = "PinlessDebitRequest";
	public static String RequestTypeEBT = "EBTRequest";
	public static String RequestTypeCHECK = "CheckRequest";
	public static String RequestTypePREPAID = "PrepaidRequest";
	public static String RequestTypeTRANS = "TransArmorRequest";
	public static String RequestTypeADMIN = "AdminRequest";
	public static String RequestTypeREVERSAL = "ReversalRequest";
	
	public static String PaymntTypeCREDIT = "Credit";
	public static String PaymntTypeDEBIT = "Debit";
	public static String PaymntTypePLDEBIT = "PLDebit";
	public static String PaymntTypeEBT = "EBT";
	public static String PaymntTypeCHECK = "Check";
	public static String PaymntTypePREPAID = "Prepaid";
	
	public static String CardTypeAmex = "Amex";
	public static String CardTypeDiners = "Diners";
	public static String CardTypeDiscover = "Discover";
	public static String CardTypeJCB = "JCB";
	public static String CardTypeMastercard = "Mastercard";
	public static String CardTypePPayCL = "PPayCL";
	public static String CardTypeVisa = "Visa";
	
	public static String ccvindTypeNtprvd = "Ntprvd";
	public static String ccvindTypePrvded = "Prvded";
	public static String ccvindTypeIllegible = "Illegible";
	public static String ccvindTypeNtOnCrd = "NtOnCrd";
	public static String ccvindTypeMastercard = "Mastercard";
	public static String ccvindTypePPayCL = "PPayCL";
	public static String ccvindTypeVisa = "Visa";
	
	public static String TranTypeActivation = "Activation";
	public static String TranTypeAuthorization = "Authorization";
	public static String TranTypeBalanceInquiry = "BalanceInquiry";
	public static String TranTypeBalanceLock = "BalanceLock";
	public static String TranTypeCashout = "Cashout";
	public static String TranTypeCashoutActiveStatus = "CashoutActiveStatus";
	public static String TranTypeCompletion = "Completion";
	public static String TranTypeEMVKeyReqResp = "EMVKeyReqResp";
	public static String TranTypeKeyExchangeRequest = "KeyExchangeRequest";
	public static String TranTypeLoad = "Load";	
	public static String TranTypeRedemption = "Redemption";
	public static String TranTypeRedemptionUnlock = "RedemptionUnlock";
	public static String TranTypeRefund = "Refund";
	public static String TranTypeReload = "Reload";
	public static String TranTypeSale = "Sale";	
	public static String TranTypeTAKeyRequest = "TAKeyRequest";
	public static String TranTypeTATokenRequest = "TATokenRequest";
	public static String TranTypeVoucherClear = "VoucherClear";	
	public static String TranTypeVerification = "Verification";
	
	public static String posentrymode_part1_unspecified = "00";
	public static String posentrymode_part1_manual = "01";
	public static String posentrymode_part1_barcode = "03";
	public static String posentrymode_part1_OCR = "04";
	public static String posentrymode_part1_ICR = "05";
	public static String posentrymode_part1_CICR = "07";
	public static String posentrymode_part1_manual_entry_at_chip_terminal = "79";
	public static String posentrymode_part1_magnetic_strip_at_chip_terminal = "80";
	public static String posentrymode_part1_Contactless_mobile_Commerce = "82";
	public static String posentrymode_part1_Magnetic_Stripe_Track_Read = "90";	
	public static String posentrymode_part1_Contactless_Magnetic_Stripe_Read = "91";
	public static String posentrymode_part1_Integrated_CircuitRead = "95";
	
	public static String posentrymode_part2_Unspecified = "0";
	public static String posentrymode_part2_PIN_entry_capability = "1";
	public static String posentrymode_part2_No_PIN_entry_capability = "2";	
	public static String posentrymode_part2_PIN_Pad_Inoperative = "3";
	public static String posentrymode_part2_PIN_verified_by_terminal_device = "4";
	
	public static String poscondcode_Cardholder_Present_Card_Present = "00";
	public static String poscondcode_Cardholder_Present_Unattended_Device = "02";
	public static String poscondcode_Cardholder_Present_Suspect_Fraud = "03";
	public static String poscondcode_Cardholder_Not_Present_Recurring= "04";
	public static String poscondcode_Cardholder_Present_Card_Not_Present = "05";
	public static String poscondcode_Cardholder_Present_Identity_Verified = "06";
	public static String poscondcode_Cardholder_Not_Present_Mail_Order_Telephone_Order = "08";
	public static String poscondcode_Cardholder_Not_Present_Ecommerce = "59";
	public static String poscondcode_Cardholder_Present_Magnetic_Stripe_Could_Not_Be_Read = "71";
	
	public static String termcatcode_Electronic_Payment_Terminal = "01";
	public static String termcatcode_Automated_Fuel_Dispensing_Machine = "05";
	public static String termcatcode_Unattended_Customer_Terminal = "06";
	public static String termcatcode_Mobile_Terminal = "08";
	public static String termcatcode_Electronic_Cash_Register = "12";
	public static String termcatcode_Ticket_Machine = "17";
	public static String termcatcode_Call_Center_Operator = "18";
	
	public static String termentrycapablt_Unspecified = "00";
	public static String termentrycapablt_Terminal_not_used = "01";
	public static String termentrycapablt_Magnetic_stripe_only = "02";
	public static String termentrycapablt_Magnetic_stripe_and_key_entry = "03";
	public static String termentrycapablt_Magnetic_stripe_key_entry_and_chip = "04";
	public static String termentrycapablt_Bar_code = "05";
	public static String termentrycapablt_Proximity_terminal_contactless_chip_RFID = "06";
	public static String termentrycapablt_OCR = "07";
	public static String termentrycapablt_Chip_only = "08";
	public static String termentrycapablt_Chip_and_magnetic_stripe = "09";
	public static String termentrycapablt_Manual_entry_only = "10";
	public static String termentrycapablt_Proximity_terminal_contactless_magnetic_stripe = "11";
	
	public static String termlocind_On_Premises = "0";
	public static String termlocind_Off_Premises = "1";
	
	public static String cardcaptcap_terminal_has_no_card_capture_capability_or_no_terminal_used = "0";
	public static String cardcaptcap_terminal_has_card_capture_capability = "1";
	
	public static String PartAuthrztnApprvlCapablt_not_supported = "0";
	public static String PartAuthrztnApprvlCapablt_partial_authorization = "1";
	
	public static HashMap<String, String> responsecodes = new HashMap<String, String>();
		
	public static String currentTime() {
		Calendar c = Calendar.getInstance();
		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
		String formattedDate = df.format(c.getTime());
		return formattedDate;
	}
	
	public static void responseCodeDetails(){
		responsecodes.put("000", "Approve");
		responsecodes.put("002", "Approve for partial amount");
		responsecodes.put("003", "Approve VIP");
		responsecodes.put("100", "Do not honor");
		responsecodes.put("101", "Expired card");
		responsecodes.put("104", "Restricted card");
		responsecodes.put("105", "Call acquirer's security");
		responsecodes.put("106", "Allowable PIN tries exceeded");
		responsecodes.put("107", "Call for authorization");
		responsecodes.put("108", "Refer to issuer�s special");
		responsecodes.put("109", "Invalid merchant. The merchant is not in the merchant database or the merchant is not permitted to use this particular card.");
		responsecodes.put("110", "Invalid amount");
		responsecodes.put("116", "Not sufficient funds");
		responsecodes.put("117", "Incorrect PIN");
		responsecodes.put("118", "No card record");
		responsecodes.put("119", "Transaction not permitted to cardholder");
		responsecodes.put("120", "Transaction not permitted to terminal");
		responsecodes.put("121", "Exceeds withdrawal amount limit");
		responsecodes.put("123", "Exceeds withdrawal frequency limit");
		responsecodes.put("124", "Violation of law");
		responsecodes.put("130", "Invalid terminal");
		responsecodes.put("131", "Invalid account number");
		responsecodes.put("132", "Unmatched card expiry date");
		responsecodes.put("208", "Lost card");
		responsecodes.put("209", "Stolen card");
		responsecodes.put("302", "Account closed. The account was closed, probably because the account balance was $0.00.");
		responsecodes.put("303", "Unknown account. The account could not be located in the account table.");
		responsecodes.put("304", "Inactive account. The account has not been activated by an approved location.");
		responsecodes.put("308", "Already active. The card is already active and does not need to be reactivated");
		responsecodes.put("311", "Not lost or stolen");
		responsecodes.put("315", "Bad mag stripe. The mag stripe could not be parsed for account information");
		responsecodes.put("316", "Incorrect location. There was a problem with the merchant location.");
		responsecodes.put("317", "Max balance exceeded. The transaction, if completed, would cause the account balance to be exceeded by the max_balance as specified in the promotion. Some merchants set the max_balance to a value twice the max transaction amount.");
		responsecodes.put("318", "Invalid amount. There was a problem with the amount field in the transaction format � more or less than min/max amounts specified in the promotion for that transaction.");
		responsecodes.put("319", "Invalid clerk. The clerk field was either missing, when required, or the content did not match the requirements");
		responsecodes.put("320", "Invalid password");
		responsecodes.put("321", "Invalid new password. The new password does not meet the minimum security criteria");
		responsecodes.put("322", "Exceeded account reloads. The clerk/user/location was only permitted to reload some number of accounts. That number was exceeded. (See your Business Manager in order to extend this limit.)");
		responsecodes.put("323", "Password retry exceeded. The user account has been frozen because the user attempted access and was denied. Seek management assistance.");
		responsecodes.put("326", "Incorrect transaction version or format number for POS transactions");
		responsecodes.put("327", "Request not permitted by this account");
		responsecodes.put("328", "Request not permitted by this merchant location");
		responsecodes.put("329", "Bad_repay_date");
		responsecodes.put("330", "Bad checksum. The checksum provided is incorrect.");
		responsecodes.put("331", "Balance not available (denial). Due to an internal First Data Closed Loop Gift Card (CLGC) issue, information from this account could not be retrieved.");
		responsecodes.put("332", "Account locked");
		responsecodes.put("333", "No previous transaction. The void or reversal transaction could not be matched to a previous (original) transaction. In the case of a pre-auth redemption, the corresponding locking transaction could not be identified.");
		responsecodes.put("334", "Already reversed");
		responsecodes.put("336", "Bad authorization code. The authorization code test failed.");
		responsecodes.put("337", "Too many transactions requested");
		responsecodes.put("338", "No transactions available/no more transactions available. There are no transactions for this account or there are no transactions as determined by the specified first transaction number.");
		responsecodes.put("339", "Transaction history not available");
		responsecodes.put("340", "New password required");
		responsecodes.put("341", "Invalid status change. The status change requested (e.g. lost/stolen, freeze active card) cannot be performed.");
		responsecodes.put("342", "Void of activation after account activity");
		responsecodes.put("343", "No phone service. Attempted a calling card transaction on an account which is not configured for calling card activity.");
		responsecodes.put("344", "Internet access disabled");
		responsecodes.put("345", "Invalid EAN. The EAN is not correct for the provided account number.");
		responsecodes.put("346", "Invalid merchant key. The merchant key block provided is invalid. (e.g. The working key provided in an Assign Merchant Working Key transaction).");
		responsecodes.put("347", "Promotions for Internet virtual and physical cards do not match. When enabling a physical card to a virtual card, both must be from the same promotion. Cards for bulk activation request must be from the same promotion");
		responsecodes.put("348", "Invalid transaction source. The provided source (field EA) is not valid for this transaction.");
		responsecodes.put("349", "Account already linked. (e.g. Response when enabling a physical card, when the two provided accounts have already been linked together.)");
		responsecodes.put("350", "Account not in inactive state. (e.g. Response when enabling a physical card, when the physical card in not in an inactive state.)");
		responsecodes.put("351", "First Data Voice Services returns this response on Internet transactions where the interface input parameter is not valid.");
		responsecodes.put("352", "First Data Voice Services returns this response on Internet transactions where they did not receive a response from CLGC.");
		responsecodes.put("353", "First Data Voice Services returns this response on Internet transactions where the client certificate is invalid.");
		responsecodes.put("354", "Merchant not configured as International although the account requires it. (e.g. The account allows currency conversion but the merchant is not configured for International.)");
		responsecodes.put("355", "Invalid currency. The provided currency is invalid.");
		responsecodes.put("356", "Request not International. Merchant configured to require currency information for each financial transaction, however none was sent.");
		responsecodes.put("357", "Currency conversion error. Internal CLGC system error.");
		responsecodes.put("359", "The terminal transaction number did not match (on a void or reversal).");
		responsecodes.put("360", "First Data Voice Services added a layer of validation that checks the data they receive from CLGC to make sure it is HTML friendly (i.e. no binary data). First Data Voice Services will return this response on Internet transactions if the check fails (the data is not HTML friendly).");
		responsecodes.put("367", "Target embossed card entered and Transaction count entered do not match");
		responsecodes.put("368", "No account link");
		responsecodes.put("369", "Invalid time zone");
		responsecodes.put("370", "Account on hold");
		responsecodes.put("372", "Promo location restricted");
		responsecodes.put("373", "Invalid Card Account");
		responsecodes.put("374", "Product code(s) restricted");
		responsecodes.put("375", "Bad Post Date. The Post Date is not a valid date.");
		responsecodes.put("376", "Account status is void lock");
		responsecodes.put("377", "Already active and reloadable");
		responsecodes.put("378", "Account is Purged. The Account record was purged from the database.");
		responsecodes.put("380", "Bulk activation error");
		responsecodes.put("381", "Bulk activation un-attempted error");
		responsecodes.put("382", "Bulk activation package amount error");
		responsecodes.put("383", "Store location zero not allowed");
		responsecodes.put("384", "Account row locked");
		responsecodes.put("385", "Accepted but not yet processed");
		responsecodes.put("402", "TransArmor Service");
		responsecodes.put("403", "TransArmor Invalid Token or");
		responsecodes.put("404", "TransArmor Key Error");
		responsecodes.put("500", "Decline");
		responsecodes.put("501", "Date of Birth Error for Check Processing");
		responsecodes.put("502", "Invalid State Code");
		responsecodes.put("503", "New Account Information");
		responsecodes.put("504", "Do not try again");
		responsecodes.put("505", "Please retry");
		responsecodes.put("506", "Invalid Checking Account Number");
		responsecodes.put("507", "New Account Information available");
		responsecodes.put("508", "Try again later - Declined: Association's payment cancellation advice code provided. Applies to recurring authorizations only. These are examples of what may have occurred: the account is over the credit limit try again in 72 hours.");
		responsecodes.put("509", "Do not try again � Applies to recurring authorizations only. The card has expired");
		responsecodes.put("510", "New Account Information � Applies to recurring authorizations only. The card has expired");
		responsecodes.put("511", "Try again later � Applies to recurring authorizations only. The card has expired. Get the new expiration date and try");
		responsecodes.put("512", "Service not allowed");
		responsecodes.put("513", "Decline. Transaction not permitted to acquirer or terminal");
		responsecodes.put("514", "Do not try again � Applies to recurring authorizations only. There was security violation.");
		responsecodes.put("515", "Declined. No term record on First Data system");
		responsecodes.put("516", "Please retry � Reasons for this error are one of the following: Format Error, Unable to route transaction, Switch or issuer unavailable, System Busy, Timeout");
		responsecodes.put("517", "CVV2 Declined");
		responsecodes.put("518", "Invalid account/date or sales date in future");
		responsecodes.put("519", "Invalid Effective Date");
		responsecodes.put("520", "Reversal Rejected. Do not try again.");
		responsecodes.put("521", "Enter lesser amount");
		responsecodes.put("522", "Cash Back greater than total Transaction amount");
		responsecodes.put("523", "Crypto box is offline");
		responsecodes.put("524", "Debit Switch unavailable Timeout Retry � Communications link to debit/EBT network gateway is down or responded with a \"System Malfunction (96)\" message");
		responsecodes.put("525", "Debit/EBT network gateway cannot get through to the ISSUER.");
		responsecodes.put("526", "Undefined Card � Debit/EBT network gateway cannot route card based on Merchant Entitlement");
		responsecodes.put("527", "Network Response indicates that Merchant ID / SE is invalid");
		responsecodes.put("528", "Debit/EBT transaction count exceeds pre-determined limit in specified time/ Withdrawal limit exceeded.");
		responsecodes.put("529", "Resubmission of transaction violates debit/EBT network frequency");
		responsecodes.put("530", "The authorizing network has a problem decrypting the cryptogram in the request");
		responsecodes.put("532", "The DUKPT Base Derivation key is missing or incorrect in the PIN pad, or PIN key synchronization error.");
		responsecodes.put("540", "Edit Honor");
		responsecodes.put("541", "No Savings Account");
		responsecodes.put("542", "DUKPT: An error while processing the PIN block that is not related to the point- of-sale equipment. Contact the Help Desk for assistance.");
		responsecodes.put("701", "Approved EMV Key Load");
		responsecodes.put("702", "EMV Key Download Error");
		responsecodes.put("703", "Approved EMV Key Load, more key load data pending");
		responsecodes.put("704", "Pick Up Card");
		responsecodes.put("708", "Honor With Authentication");
		responsecodes.put("726", "Unable to Locate Record On File");
		responsecodes.put("727", "Refer � Call Authorization (Checks only)");
		responsecodes.put("728", "Referred � Skip Trace Info");
		responsecodes.put("729", "Hard Negative Info On File");
		responsecodes.put("740", "Totals Unavailable");
		responsecodes.put("767", "Hard Capture; Pick Up");
		responsecodes.put("771", "Amount Too Large");
		responsecodes.put("772", "Duplicate Return");
		responsecodes.put("773", "Unsuccessful");
		responsecodes.put("774", "Duplicate Reversal");
		responsecodes.put("775", "Subsystem Unavailable");
		responsecodes.put("776", "Duplicate Completion");
		responsecodes.put("782", "Count Exceeds Limit");
		responsecodes.put("785", "No reason to decline.");
		responsecodes.put("790", "Not approved. Used only in Visa bill/recurring payment. Merchant must not resubmit same transaction but may continue billing process in subsequent billing period.");
		responsecodes.put("791", "Not approved. Used only in Visa bill/recurring payment. Merchant must stop recurring payment requests.");
		responsecodes.put("902", "Invalid transaction. This card or terminal is not permitted to perform this transaction, or the transaction type is invalid, or First Data is unable to route a refund request to the network.");
		responsecodes.put("904", "Format error.");
		responsecodes.put("906", "System Error. There is a problem with the host processing system. Call your helpdesk or operations support.");
		responsecodes.put("908", "Transaction destination not");
		responsecodes.put("909", "System malfunction.");
		responsecodes.put("911", "Card issuer timed out.");
		responsecodes.put("913", "Duplicate transaction.");
		responsecodes.put("914", "Void/Full Reversal requests in which the Original Authorization was not found.");
		responsecodes.put("940", "Error.");
		responsecodes.put("941", "No such issuer.");
		responsecodes.put("954", "CCV failed.");
	}
	
}
